<template>
  <div class="header">
    <div class="header-left">
      <div class="iconfont back-icon">&#xe624;</div>
    </div>
    <div class="header-input"><span class="iconfont">&#xe632;</span>输入城市/景点/游玩主题</div>
    <router-link to="/city">
      <div class="header-right">{{this.city}}<span class="iconfont arrow-icon">&#xe600;</span></div>
    </router-link>
  </div>
</template>

<script>
import { mapState, mapGetters } from 'vuex'
export default {
  name: 'HomeHeader',
  computed: {
    ...mapState(['city']),
    ...mapGetters(['doubleCity'])
  }
}
</script>

<style lang="stylus" scoped>
  @import '~css/varibles.styl'
  .header
    font-size :0.3rem
    display : flex
    height: $headerHeight
    background: $bgColor
    line-height $headerHeight
    color: #fff
    /*左边返回*/
    .header-left
      width: 0.64rem
      float: left
      .back-icon
        text-align :center
     //中间输入框
    .header-input
      flex: 1
      background :#ffffff
      border-radius :.1rem
      height :.64rem
      line-height .64rem
      margin-top :.12rem
      margin-left: .1rem
      color: #ccc
      padding-left: 0.2rem
     //右边定位
    .header-right
      min-width: 1.04rem
      padding :0 .1rem
      float: right
      text-align: center
      color :#fff
      .arrow-icon
        font-size :0.24rem
        margin-left -0.04rem
</style>
